package org.easy.chatai.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Setter
@Getter
public class AIMessageImgContent {


    public static AIMessageImgContent.AIMessageImgContentBuilder text(String text) {
        return AIMessageImgContent.builder().type("text").text(text);
    }

    public static AIMessageImgContent.AIMessageImgContentBuilder imageUrl(String imageUrl) {
        return AIMessageImgContent.builder().type("image_url").imageUrl(new ImageUrl(imageUrl));
    }

    private String type;
    private String text;
    @JSONField(name = "image_url")
    private ImageUrl imageUrl;


    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class ImageUrl {
        private String url;
    }
}
